<template>
	<view class="page">
		<view class="my_padding">
			
			<view class="zx_list">
				<view class="zx_item" @click="navToUrl('')">
					<view class="video_part">
						<video autoplay="false"  src="https://thomasinebeckham.oss-cn-hongkong.aliyuncs.com/mp4/1.mp4"></video>
					</view>
					<view class="video_tit">AI人工智能发展历程</view>
				</view>
			</view>
			
			<view class="zx_list">
				<view class="zx_item" @click="navToUrl('')">
					<view class="video_part">
						<video autoplay="false"  src="https://thomasinebeckham.oss-cn-hongkong.aliyuncs.com/mp4/2.mp4"></video>
					</view>
					<view class="video_tit">AI人工智能的73年演变史，如今发展到什么阶段了</view>
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import tabBar from '@/components/tabBar/tabBar.vue'
	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
	export default {
		components: {
			tabBar,
			uniPopupDialog
		},
		data() {
			return {
				user_bg: '',
				avatar: '/static/icon_avatar.png',
				userinfo: [],
				list: [],
				currentPage: '/pages/user/person',
				ifOnShow: false,
				unit: '',
				message: "",
			};
		},
		onHide() {
			this.ifOnShow = true
		},
		onShow() {
			if (this.ifOnShow) {
				this.getData();
			}
			let pages = getCurrentPages();
			let currPage = pages[pages.length-1];
			if (currPage.$vm.bank_id){
				this.bank_id = currPage.$vm.bank_id;
				// this.loadData();
			}
		},
		onLoad: function(option) {
			// this.getData();
			// this.$refs.popupDialog.open()
		},
		methods: {
			//user数据
			getData: function() {
				var info = uni.getStorageSync("userinfo");
				if (info.token) {
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['username=' + info.username, 'token=' + info.token, 'timestamp=' +
						timestamp
					]);
					this.helper.req({
						api: "getUserInfo",
						timestamp: timestamp,
						data: {
							username: info.username,
							token: info.token
						},
						header: {
							sign: sign
						},
						method: 'GET',
					}).then(res => {
						// console.log('userInfo参数:', this.userinfo)
						
					})
				} else {
					uni.hideLoading();
				}
			},
			//跳转url List
			loadPersonNav: function() {
				//获取基础参数
				// uni.showLoading({
				// 	title: "数据加载中",
				// 	mask: true
				// })
				var info = uni.getStorageSync("userinfo");
				if (info.token) {
					let timestamp = this.helper.now();
					let sign = this.helper.setSign(['token=' + info.token, 'timestamp=' + timestamp]);
					this.helper.req({
						api: "getPersonNav",
						timestamp: timestamp,
						data: {
							token: info.token
						},
						header: {
							sign: sign
						},
						method: 'GET',
					}).then(res => {
						// console.log('url：', res.data.data.list)
						this.list = res.data.data.list;

						setTimeout(() => {
							uni.hideLoading();
						}, 300);
					})
				} else {
					uni.hideLoading();
				}
			},
			navToUrl: function(url) {
				return uni.navigateTo({
					url: url
				});
			},
			imageError: function(e) {
				this.avatar = '/static/icon_avatar.png';
			},
			confirmHandler() {
				// 处理确认按钮点击事件
				console.log('确认按钮点击了')
			},
			showDialog(){
				this.toggleMessage()
			},
			toggleMessage() {
				this.$refs.popupDialog.open()
			},
			dialogConfirm(done){
				done()
			},
			checkInvite(){
				uni.showModal({
					title: "提示",
					content: "暂无邀请收益",
					showCancel: false,
					confirmText: "确定",
					success: function(res) {
						
					}
				})
			}
		},
	};
</script>

<style lang="scss">
	page {
		font-size: 3.46667vw;
		min-width: 325px;
		color: #56595d;
		background-color: #ddeafd;
		padding-bottom: 16px;
	}
	
	.my_padding {
		background-color: #EEE;
		height: 760px;
	}
	
	.news_active{
		height: 50vw;
		padding: 10px;
		width: 94vw;
		background: #fff;
		margin: 3vw;
		border-radius: 8px;
		position: relative;
	}
	.active{
		position: absolute;
		top: 10px;
		left: 10px;
		line-height: 24px;
		padding: 2px 10px;
		font-size: 14px;
		border:1px solid #d4244e;
		color:#d4244e;
		border-radius:6px;
	}
	.new_tit{
		position: absolute;
		top: 40px;
		left: 10px;
		width: 280px;
		line-height: 40px;
		font-weight: bold;
		font-size: 16px;
	}
	.new_date{
		position: absolute;
		top: 80px;
		left: 10px;
		width: 200px;
		height: 30px;
		line-height: 20px;
		font-size: 14px;
		color:#999;
	}
	.new_contain{
		position: absolute;
		top: 130px;
		left: 10px;
		width: 340px;
		height: 30px;
		line-height: 20px;
		font-size: 15px;
		padding: 10px;
		color:#666;
	}
	
	.zx_tit{
		line-height: 30px;
		padding: 10px 0 0;
		font-size: 16px;
		font-weight: bold;
		width: 96vw;
		margin-left: 3vw;
		text-align: center;
	}
	.zx_list{
		// height: 50vw;
		padding: 10px;
		width: 94vw;
		background: #fff;
		margin: 3vw;
		border-radius: 8px;
	}
	.zx_item{
		height: 60vw;
		width: 100%;
		border-bottom: 0.5px solid #EEE;
	}
	.zx_item image{
		width: 20vw;
		height: 20vw;
		float: left;
	}
	.zx_contain{
		width: 66vw;
		height: 20vw;
		line-height: 24px;
		padding: 10px 6px;
		font-size: 15px;
		float: left;
	}
	
	.inviteRecode{
		line-height: 30px;
		padding: 6px 0;
		height: 42px;
		width: 60%;
		position: absolute;
		bottom: -20px;
		left: 20%;
		color:#fff;
		background-color: #fea829;
		font-size: 14px;
		text-align: center;
		border-radius: 8px;
	}
	
	.invite_now{
		line-height: 30px;
		padding: 6px 0;
		height: 42px;
		width: 100%;
		position: absolute;
		bottom: 0;
		left: 0;
		color:#fff;
		background-color: #fea829;
		font-size: 14px;
		text-align: center;
	}
	
	.invite_img{
		width: 40px;
		height: 40px;
	}
	.grid-item-box text{
		line-height: 20px;
		display: inherit;
		font-size: 14px; 
		color:#333;
	}
	
	.newuser{
		min-height: 800px;
		position: relative;
	}
	
	.invite_regular{
		position: absolute;
		top: 360px;
		left:4%;
		width: 92%;
		height: 200px;
		color: #fff;
		font-size: 14px;
	}
	.regular_tit{
		font-size: 15px;
		font-weight: bold;
		line-height: 30px;
	}
	.regular_contain p{
		font-size: 14px;
	}
	
	.checkTeam{
		position: fixed;
		top: 56px;
		right: 0;
		padding: 6px 10px 6px 16px;
		line-height: 20px;
		font-size: 16px;
		background: #fea829;
		color:#fff;
		border-radius:16px 0 0 16px;
	}
	
	.video_part{
		width: 84vw;
		margin: 2vw ;
	}
	.video_part video{
		width: 84vw;
		height: 46vw;
	}
	.video_tit{
		font-size: 16px;
		color:#666;
		line-height: 30px;
		padding: 0 10px;
	}

</style>
<!-- index -->
<style lang="scss" scoped>
	.tab-bar-footer {
		background-color: #fff;
		border-radius: 3.2vw;
		// margin: 3.33333vw auto 0;
		    margin-bottom: 60px;
			padding: 16px 0;
		width: 94vw;
		box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
	}

	.tab-bar {
		padding: 30px 0;
		background-color: #fff;
		border-radius: 3.2vw;
		// margin: 3.33333vw auto 0;
		width: 94vw;
		box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);

	}
</style>
<!-- uni-grid -->
<style lang="scss" scoped>
	.image {
		width: 25px;
		height: 25px;
	}

	.text {
		margin-top: 10upx;
	}

	.example-body {
		/* #ifndef APP-NVUE */
		// display: block;
		/* #endif */
	}

	.swiper {
		height: 420px;
	}

	/* #ifdef H5 */
	@media screen and (min-width: 768px) and (max-width: 1425px) {
		.swiper {
			height: 630px;
		}
	}

	@media screen and (min-width: 1425px) {
		.swiper {
			height: 830px;
		}
	}

	/* #endif */
</style>